package test.Issue;

import test.config.Config;

public class Issue {
	private static String ASSIGNED_STATUS = "Assigned";
		
	private String id;
	private int priority;
	private String assignee;
	private String jiraInernalId;
	
	public Issue(String id, int priority, String assignee, String status) {
		super();
		this.id = id;
		this.priority = priority;
		this.assignee = assignee;
		this.status = status;
	}
	private String status;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getPriority() {
		return priority;
	}
	public void setPriority(int priority) {
		this.priority = priority;
	}
	public String getAssignee() {
		return assignee;
	}
	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "id: "+id+" priority: "+priority+" assignee: "+assignee+" status: "+status;
	}
	public boolean shouldProcess() {
		return priority <= Config.getMaxIssuePriorityToProcess() && status.equalsIgnoreCase(ASSIGNED_STATUS);
	}
	public String getJiraInernalId() {
		return jiraInernalId;
	}
	public void setJiraInernalId(String jiraInernalId) {
		this.jiraInernalId = jiraInernalId;
	}
}
